declare module "gm" {
  namespace Types {
    namespace Xhr {
      interface Details extends CM_Types.Xhr.Details {
        context?: AnyRecord;
        data?: string;
        responseType?: XMLHttpRequestResponseType | "ms-stream";
        synchronous?: boolean;
        upload?: {
          onabort?: (e: CM_Types.Xhr.Progress) => void;
          onerror?: (e: CM_Types.Xhr.Progress) => void;
          onload?: (e: CM_Types.Xhr.Progress) => void;
          onprogress?: (e: CM_Types.Xhr.Progress) => void;
        };
        url: string;
        onabort?: (e: CM_Types.Xhr.Progress) => void;
        onerror?: (e: CM_Types.Xhr.Progress) => void;
        onload?: (e: CM_Types.Xhr.Progress) => void;
        onloadend?: (e: CM_Types.Xhr.Progress) => void;
        onloadstart?: (e: CM_Types.Xhr.Progress) => void;
        onprogress?: (e: CM_Types.Xhr.Progress) => void;
        onreadystatechange?: (e: CM_Types.Xhr.Progress) => void;
        ontimeout?: (e: CM_Types.Xhr.Progress) => void;
      }
      interface Response extends CM_Types.Xhr.Response {
        readonly context?: AnyRecord;
      }
    }
    namespace Notification {
      interface Option extends CM_Types.Notification.Option {
        onclick?: (this: Option) => void;
        ondone?: (this: Option) => void;
      }
    }
    type Resource = {
      readonly name: string;
      readonly mimetype: string;
      readonly url: string;
    };
  }
}
